import React, { Component } from 'react';
import { Button, message } from 'antd'
import imgageSrcLIST from './imgsrc_list'

class index extends Component {
    render() {
        return (
            'wqqqqqq'
        );
    }
}

export default index;


class picImagePreview extends Component {
    copysrc = (v) => {
        navigator.clipboard.writeText(v.src)
            .then(() => {
                message.success('复制成功')
            })
            .catch(() => {
                message.error('复制失败')
            });
    }
    render() {
        return (

            <div  >
                {imgageSrcLIST.map(v => {
                    return <div style={{ display: 'inline-block', margin: 'auto' }}>
                        <div >
                            <img src={v.src} style={{ width: "240px", padding: "10px" }} alt="" />
                        </div>
                        <div >
                            {v.desc}
                        </div>
                        <Button onClick={() => {
                            this.copysrc(v)
                        }}>复制路径</Button>
                    </div>
                })}
            </div>

        );
    }
}

export const PicImagePreview = picImagePreview;
